<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
		#d1 img{
			height: 200px;
			width: 400px;
		}
		</style>
		<script src="../js/jquery-3.4.1.min.js"></script>
		<script>
			$(function() {
				var ar = ["../day12/1.png", "../day12/2.jpg", "../day12/3.jpg", "../day12/4.png"];
				var start = 0;
				var links = ["1.html", "2.html", "3.html", "5.html"];
				var timer;
				timer = window.setInterval(function() {
					doload();
				}, 1100);
				
				$("#d1 a").mouseover(function(){
					window.clearInterval(timer);
				}).mouseout(function(){
					timer = window.setInterval(function() {
						doload();
					}, 1100);
				});
					
				function doload() { 
					$("#p1").attr("src", ar[start]);
					$("#d1 a").attr("href", links[start]);
					start = ++start % ar.length;
				}
			});
		</script>
	</head>
	<body>
		<div id="d1">
			<a href="#">
				<img src="../day12/1.png" id="p1" />
			</a>
		</div>
	</body>
</html>
